
/// <summary>
/// 可以使用 readonly 修饰符声明 只读字段。 
public class MyColor  {

    public byte R;
    public byte G;
    public byte B;
    public MyColor(byte r, byte g, byte b) {
        R=r;
        G=g;
        B=b;
    }

    public override string ToString() {
        return $"(red={R}, green={G}, blue={B})";
    }

    public static readonly MyColor Black = new MyColor(0,0,0);
    public static readonly MyColor White = new MyColor(255,255,255);
    public static readonly MyColor Red = new MyColor(255, 0, 0);
    public static readonly MyColor Green = new MyColor(0,255,0);
    public static readonly MyColor Blue = new MyColor(0,0,255);
}